#define _CRT_SECURE_NO_WARNINGS 1
#include"vector.h" // my vector
#include<iostream> // cout
using namespace std;
void test1()
{
	peng::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(4);

	for (int s : v1)
	{
		cout << s << " ";
	}
	cout << endl;

	peng::vector<int> v2 = { 1,2,2,1 };
	for (int s : v2)
	{
		cout << s << " " ;
	}
	cout << endl;
	v2.resize(10);
	for (int s : v2)
	{
		cout << s << " ";
	}
	cout << endl;

	peng::vector<int> v3(v2);
	for (int s : v3)
	{
		cout << s << " ";
	}
	cout << endl;
	v1 = v2;
	for (int s : v1)
	{
		cout << s << " ";
	}
	cout << endl;
}
void test2()
{
	peng::vector<int> v1;
	v1.push_back(1);
	v1.push_back(2);
	v1.push_back(3);
	v1.push_back(4);
	v1.push_back(4);

	peng::vector<int> v2 = { 1,2,2,1 };
	v1 = v2;
	for (int s : v1)
	{
		cout << s << " ";
	}
	cout << endl;
	v1.insert(v1.begin(), 9);
	v1.erase(v1.begin());
	v1[0] = 0;
	for (int s : v1)
	{
		cout << s << " ";
	}
}
int main()
{
	//test1();
	test2();
	return 0;
}